/**
 * @author Eric Jahn
 * Course: Object Oriented Programming 
 * Final Project
 * Due Date: August 3, 2012
 */
package oop.chat.data;
import java.util.ArrayList;
import java.util.Date;

/**
 * 
 * @author Eric Jahn
 */
public class MessageLog 
{    
    private Date startDate = null;
    private Date endDate = null;
    private ArrayList<Message> messages;
    
	/**
	 * constructor
	 */
    MessageLog()
    {
        this.messages = new ArrayList<>();
    }
    
	/**
	 * add a new message to the log
	 * @param	message		Message
	 */
    void addMessageToLog(Message message)
    {
        if(this.startDate == null)
        {
            this.startDate = new Date();
        }
        this.endDate = new Date();
        this.messages.add(message);
    }
}
